# coding=utf-8
import random


def get_ball_numbers():
    """生成双色球号码"""
    list_a = []
    while True:
        red_number = str(random.randint(1, 33))
        if red_number not in list_a:
            list_a.append(red_number)
            if len(list_a) == 6:
                list_a.insert(random.randint(0, 6), str(random.randint(1, 16)))
                return list_a



def get_branhes(number):
    """生成指定条目的双色球"""
    ball_list = []
    while True:
        ball_number = ','.join(get_ball_numbers())
        if ball_number not in ball_list:
            ball_list.append(ball_number)
            if len(ball_list) == number:
                return ball_list


if __name__ == '__main__':
    test = get_branhes(2)
    print(test)
